package cn.jetpiece.cloud.system.dp.app.enums;

import cn.jetpiece.cloud.online.app.modules.cgform.enums.CgformEnum;
import lombok.Getter;

/**
 * @ProjectName: jetpiece-system-bpm
 * @ClassName: cn.jetpiece.cloud.system.dp.app.enums.PermCheckEnum
 * @Author: zdingxin
 * @Description:
 * @Date: 2023-05-25
 * @Version: 1.0
 */
@Getter
public enum PermCheckEnum {

    Y("是", 1),
    N("否", 0);

    private String code;
    private Integer value;

    PermCheckEnum(String code, Integer value) {
        this.code = code;
        this.value = value;
    }

    public static String getCode(Integer value) {
        for (PermCheckEnum e : PermCheckEnum.values()) {
            if (e.getValue().equals(value)) {
                return e.getCode();
            }
        }
        return null;
    }
}
